Optical encoder having high resolution

ABSTRACT

An optical encoder is provided which is not affected by fluctuation of wavelength of a light beam due to temperature change, without sacrificing resolution of measurement. The optical encoder comprises a light source emitting a light beam, a first grating to which the light beam emitted by the light source is directed, and a second grating to which light beams exiting from the first grating is directed. Additionally, displacement information obtaining means is provided for obtaining information for the displacement of one of the first and second gratings, the information being obtained according to a twice-diffracted beam and a twice-transmitted beam at the second grating. The twice-diffracted beam is generated from a diffraction beam generated at the first grating, and the twice-transmitted beam is a transmission beam which has been transmitted through the first grating.

This application is a continuation of application Ser. No. 08/229/408,filed Apr. 18, 1994, now abandoned.

BACKGROUND OF THE INVENTION

The present invention relates to an optical encoder used for measuring adisplacement of a movable member with high resolution.

Such an optical encoder is incorporated, for example, in a precisionmeasuring apparatus, a drum rotation controlling device and a scannerfor a copy machine, an ink-jet printer or the like.

German Laid-Open Patent Application (DE A1) No. 2,316,248 discloses anexample of an optical encoder of such a kind. FIG. 1 is an illustrationshowing a structure of the encoder described in DE A1 2,316,248. Theoptical encoder comprises light source 101, a lens 102 which collimatesa light beam from the light source 101, two diffraction gratings 103 and104 on which the collimated light beam is incident, a condenser lens 105and light receiving elements 106, 107 and 107'.

The diffraction grating 103 is fixed, and the diffraction grating 104 ismovable. The pitch A₁ of the grating 103 is the same as the pitch A₂ ofthe grating 104. Hereinafter, the diffraction grating 103 is referred toas a fixed diffraction grating, and the diffraction grating 104 isreferred to as a movable diffraction grating.

In the above-mentioned encoder, a light beam emitted by the light source101 is collimated by the lens 102 and is incident on the fixeddiffraction grating 103 and then the movable diffraction grating 104.The collimated light beam generates at least a first diffraction beamwhen passing through the gratings 103 and 104. If the pitch A₁ and A₂are sufficiently larger than the wavelength of the collimated lightbeam, higher order diffraction beams may be generated.

FIG. 2 is an illustration for explaining the diffraction beams generatedby the gratings 103 and 104. In FIG. 2, for example, the first orderdiffraction beam generated at the fixed diffraction grating 103 istransmitted through the movable diffraction grating 104, and received bythe light receiving element 107 via the lens 105. Additionally, thefirst order diffraction beam of the light beam transmitted through thefixed diffraction grating 103 without diffraction is generated by themovable diffraction grating 104, and is also received by the lightreceiving element 107 via the lens 105. As the movable diffractiongrating 104 is moved in a direction indicated by an arrow R, thediffraction beams generated by the movable diffraction grating 104changed in their phase, while the phase of the original light beamtransmitted through the fixed diffraction grating 103 and the movablediffraction grating 104 remains unchanged. That is, for example, thephase of the light beam A is not changed but the phase of the light beamB is changed. This results in phase shift of interference fringesgenerated by the light beams A and B on the light receiving element 107.

In this encoder, since the pitches A₁ and A₂ of the two gratings 103 and104 are equal to each other, diffraction angles of the diffraction beamshaving the same order at each of the gratings are the same. Accordingly,the light beams A and B are parallel to each other immediately afterexiting the grating 104. If the light beams A and B are incident on thelight receiving element 107 as is in their parallel relationship,interference fringes generated on the light receiving element 107 haverelatively large intervals. The interference fringes having such largeintervals are not suitable to use for measuring the displacement of themovable diffraction grating 104 because a sufficient number ofinterference fringes are not formed on the light receiving element 107.

In order to form interference fringes having a suitable interval, thecondenser lens 105 is provided between the movable diffraction grating104 and the light receiving element 107 so that the distance between thelight beams A and B narrows. According to this, as the movablediffraction grating 104 is displaced, the interference fringes are movedon the light receiving element 107, resulting in a sinusoidal change inthe amount of light received by the light receiving element 107.Specifically, if the movable diffraction grating 104 moves a smalldistance corresponding to a single pitch of the grating, the level ofoutput from the light receiving element 107 varies like a single periodof sine wave. By sensing this change, the amount of the displacement ofthe movable diffraction grating 104 can be determined.

In the above-mentioned example, although the description was given usingthe combination of one of the first diffraction beams generated on oneside of the optical axis and the original light beam transmitted throughthe grating (hereinafter referred to as direct transmission beam), thecombination of the other first diffraction beam and the directtransmission beam may be used to form interference fringes on the lightreceiving element 107' as indicated by C and D in the figure.

As for the light source used for the above-mentioned kind of encoder, asemiconductor laser (LD) is used because of requirements for compactnessand a high output. However, there is a problem in that the semiconductorlaser has high dependency in its wavelength, that is, the wavelengthvaries due to temperature changes. Accordingly, due to the temperaturechange, the diffraction angle at the gratings 103 and 104 is changed,and thus the optical path in the encoder may be changed. This conditionmay result in that the suitable fringes to generate output of the lightreceiving element are not formed on the light receiving element. In anextreme case, the diffraction beam is directed beyond the edge of thelens 5. For example, as shown in FIG. 3, when the temperature changes,the light beams A and B may be directed to paths indicated by A' and B',respectively. In order to avoid the effect of temperature change, thediffraction angle may be minimized by increasing the pitches A₁ and A₂.In such a case, however, resolution of the encoder may be decreased.

SUMMARY OF THE INVENTION

It is a general object of the present invention to provide an improvedand useful optical encoder in which the above-mentioned disadvantagesare eliminated.

A more specific object of the present invention is to provide an opticalencoder which is not affected by fluctuation of wavelength of a lightbeam due to temperature change, without sacrificing resolution ofmeasurement.

Another object of the present invention is to provide an optical encoderin which interference fringes having a predetermined pitch can be formedwithout using a condenser lens.

Another object of the present invention is to provide an optical encoderhaving gratings which can be easily manufactured.

Another object of the present invention is to provide an optical encoderin which a light source having a wide light emitting surface can beused.

In order to achieve the above-mentioned objects, there is providedaccording to the present invention, an optical encoder comprising:

a light source emitting a light beam;

a first grating to which the light beam emitted by the light source isdirected;

a second grating to which light beams exiting from the first grating aredirected; and

displacement information obtaining means for obtaining information on adisplacement of one of the first and second gratings, the informationbeing obtained according to a twice-diffracted beam and atwice-transmitted beam at the second grating, the twice-diffracted beambeing generated from a diffraction beam generated at the first grating,the twice-transmitted beam being a transmission beam which has beentransmitted through the first grating.

There is provided according to the present invention an optical encodercomprising:

a light source emitting a light beam;

a first grating to which the light beam emitted by the light source isdirected, a first and a second nth order diffraction beams beinggenerated at the first grating, where n is an integer, the first nthorder diffraction beam being directed to the opposite side, relative tothe second nth order diffraction beam, of the light beam emitted by thelight source;

a second grating to which the first and second nth order diffractionbeams exiting from the first grating are directed, a first and a secondmth order diffraction beams being generated from the and second nthorder diffraction beams at the second grating, where m is an integer,the first mth order diffraction beams being directed to the oppositeside, relative to the second nth order diffraction beam, of the opticalaxis of the respective first and second nth order diffraction beams, thesecond grating having a pitch slightly different from a pitch of thefirst grating; and

displacement information obtaining means for obtaining information on adisplacement of one of the first and second gratings, the informationbeing obtained according to a movement of interference fringes formed bythe first and second mth order diffraction beams exiting from the secondgrating.

There is provided according to the present invention an optical encodercomprising:

a light source emitting a light beam;

a first grating to which the light beam emitted by the light source isdirected, an n₁ th order and an n₂ th order diffraction beams beinggenerated at the first grating, where n₁ and n₂ are integers, the n₁ thorder diffraction beam being directed to the opposite side, relative tothe n₂ th order diffraction beam, of the optical axis of the light beamemitted by the light source;

a second grating to which the n₁ th order and the n₂ th orderdiffraction beams exiting from the first grating are directed, an m₁ thorder and an m₂ th order diffraction beams being generated from the n₁th order and the n₂ th order diffraction beams at the second grating,where m₁ and m₂ are integers; and

displacement information obtaining means for obtaining information on adisplacement of one of the first and second gratings, the informationbeing obtained according to a movement of interference fringes formed bythe m₁ th order and the m₂ th order diffraction beams exiting from thesecond grating.

According to another aspect of the present invention, there is providedan optical encoder obtaining information regarding a movable gratingincorporated therein in accordance with a movement of interferencefringes caused by a displacement of the movable grating, the opticalencoder comprises:

two light-receiving elements apart a distance corresponding to one halfof a pitch of the interference fringes, the two light-receiving elementsoutput signals having phases 180 degree different from each other; and

means for obtaining displacement information of the movable grating inaccordance with a difference between the signals.

The light receiving elements may be apart a distance corresponding toone quarter of the pitch of the interference fringes.

Other objects, features and advantages of the present invention willbecome more apparent from the following detailed description when readin conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration showing a structure of a conventional encoder;

FIG. 2 is an illustration for explaining diffraction beams generated bytwo gratings in the encoder shown in FIG. 1;

FIG. 3 is an illustration for explaining diffraction beams generated bytwo gratings in the encoder shown in FIG. 1;

FIG. 4 is an illustration showing the first embodiment of an opticalencoder according to the present invention;

FIG. 5 is an illustration for explaining a diffraction beam and atransmission beam at the two gratings shown in FIG. 4;

FIG. 6 is a graph showing change in amount of light received by a lightreceiving element in accordance with interference generated by means oftwo gratings when one of the gratings is moved;

FIG. 7 is an illustration of a variation of the first embodiment shownin FIG. 4;

FIG. 8 is an illustration showing a variation of the encoder shown inFIG. 4 in which encoder a rotation of polarization is used;

FIG. 9 is an illustration showing another example of the encoder shownin FIG. 8;

FIG. 10 is an illustration showing another example of the encoder shownin FIG. 8;

FIG. 11 is another variation of the encoder shown in FIG. 4;

FIG. 12 is a graph showing an output signal from the encoder shown inFIG. 11;

FIG. 13 is an illustration for explaining another example of the encodershown in FIG. 4;

FIG. 14 is an illustration of a rotary encoder according to the presentinvention;

FIG. 15 is an illustration of a rotary encoder according to the presentinvention;

FIG. 16 is an illustration of a second embodiment of an encoderaccording to the present invention;

FIG. 17 is an illustration of the encoder shown in FIG. 16 in which thefirst order diffraction beams of two gratings are used;

FIG. 18 is an illustration for explaining an operation principle of theencoder shown in FIG. 17;

FIG. 19 is an illustration for explaining interference fringes formed inthe encoder shown in FIG. 17;

FIG. 20 is a graph showing an output signal from a light receivingelement of the encoder shown in FIG. 17;

FIG. 21 is an illustration of an encoder of the second embodiment whichis expanded to use higher order diffraction beams;

FIG. 22 is an illustration of a rotary encoder according to the presentinvention;

FIG. 23 is an illustration of a rotary encoder according to the presentinvention;

FIG. 24 is an illustration of a third embodiment of an encoder accordingto the present invention;

FIG. 25 is an illustration showing an optical system equivalent to theencoder shown in FIG. 24;

FIG. 26A is an illustration for explaining a point light source;

FIG. 26B is an illustration for explaining a light emitting diode havinga relatively wide light emitting surface;

FIG. 27 is an illustration of a variation of the encoder shown in FIG.24;

FIG. 28 is an illustration of a fourth embodiment of an encoderaccording to the present invention;

FIG. 29 is an illustration showing an optical system equivalent to theencoder shown in FIG. 28;

FIG. 30 is an illustration of a variation of the encoder shown in FIG.28;

FIG. 31 is an illustration of a rotary encoder according to the presentinvention;

FIG. 32 is an illustration of a rotary encoder according to the presentinvention;

FIG. 33 is an illustration of a rotary encoder according to the presentinvention;

FIG. 34 is an illustration of a rotary encoder according to the presentinvention;

FIG. 35 is an illustration of a rotary encoder according to the presentinvention;

FIG. 36 is an illustration of a rotary encoder according to the presentinvention;

FIG. 37 is an illustration of a rotary encoder according to the presentinvention;

FIG. 38 is an illustration of a rotary encoder according to the presentinvention;

FIG. 39 is an illustration of an encoder in which two light receivingelements are provided apart from each other a distance corresponding toone half of the pitch of interference fringes;

FIG. 40 is a graph showing output signals from the light receivingelements shown in FIG. 39;

FIG. 41 is an illustration of the light receiving elements having asmaller width;

FIG. 42 is an illustration of an encoder in which two light receivingelements are provided apart from each other a distance corresponding toone quarter of the pitch of interference fringes;

FIG. 43 is a graph showing output signals from the light receivingelements shown in FIG. 42;

FIG. 44 is an illustration of an encoder in which three light receivingelements are provided apart from each other a distance corresponding toone quarter of the pitch of interference fringes;

FIG. 45 is a graph showing output signals from the light receivingelements shown in FIG. 44;

FIG. 46A is an illustration of a grating comprising two series of gridshaving a phase shift;

FIG. 46B is an illustration of interference fringes formed using thegrating shown in FIG. 46A;

FIG. 47 is an illustration of an encoder in which higher orderdiffraction beams are used;

FIG. 48 is an illustration of light receiving elements of an encoder inwhich four light-receiving elements are provided;

FIG. 49 is a graph showing output signals from two of the lightreceiving elements shown in FIG. 48;

FIG. 50 is a graph showing output signals from the encoder of FIG. 48;and

FIG. 51 is an illustration of the light receiving elements shown in FIG.48 having a smaller width.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A description will now be given, with reference to FIG. 4, of a firstembodiment of an optical encoder according to the present invention.FIG. 4 is an illustration showing the first embodiment of an opticalencoder according to the present invention.

The optical encoder shown in FIG. 4 comprises a light source 1, a lens 2which collimates a light beam emitted by the light source 1, twodiffraction gratings 3 and 4 on which the collimated light beam isincident and displacement information obtaining means 90.

A semiconductor laser or an LED is used as the light source 1. The pitchA₁ of the diffraction grating 3 is equal to the pitch A₂ of thediffraction grating 4. The grating surface of the diffraction grating 3is parallel to the grating surface of the diffraction grating 4. Thediffraction grating 3 is fixed, and the diffraction grating 4 is movablein a direction indicated by an arrow R. Hereinafter, the grating 3 isreferred to as a fixed diffraction grating, and the grating 4 isreferred to as a movable diffraction grating.

In the first embodiment, as shown in FIG. 5, in order to generateinterference fringes, a diffraction beam J (twice-diffracted beam) isdiffracted by both the fixed diffraction grating 3 and movablediffraction grating 4 and a light beam (twice-transmitted beam) K istransmitted directly through both the fixed diffraction grating 3 andmovable diffraction grating 4. That is, displacement information of themovable diffraction grating 4 is obtained in accordance with the twicediffraction beam J and the twice transmission beam K. In the firstembodiment, the displacement information obtaining means 90 comprises acondenser lens 5 and a single light receiving element 7.

A description will now be given of a principle of an operation of thefirst embodiment.

Conditions of diffraction at the fixed diffraction grating 3 and movablediffraction grating are given by the following expressions.

    sin θ.sub.1 +sin θ.sub.2 =nλ/A.sub.1    (1a)

    sin θ.sub.2 +sin θ.sub.3 =mλ/A.sub.2    (1b)

Where θ₁ is an incident angle at the fixed diffraction grating 3;

θ₂ is the diffraction angle at the fixed diffraction grating 3;

A₁ is the pitch of the fixed diffraction grating 3;

n is the order of diffraction at the fixed diffraction grating 3;

θ₃ is the diffraction angle at the movable diffraction grating 4;

A₂ is the pitch of the movable diffraction grating 4;

m is the order of diffraction at the movable diffraction grating 4;

λ is the wavelength of the light source 1.

By eliminating θ₂ from the above expressions, the following expressionis obtained.

    sin θ.sub.1 -sin θ.sub.3 =λ(n/A.sub.1 -m/A.sub.2)(2)

According to the expression (2), it is understood that when thewavelength λ changes, the diffraction angle θ₃ is changed in proportionto (n/A₁ -m/A₂). Therefore, in order to obtain a constant diffractionangle θ₃ even if the wave length λ is changed, the order of diffractionm and n and the pitches A₁ and A₂ must satisfy the followingrelationship.

    (n/A.sub.1 -m/A.sub.2)=0                                   (3)

In the above relationship, if the pitch A₁ is equal to the pitch A₂, theorder of diffraction at each of the gratings 3 and 4 should be the samenumber. That is, n should be equal to m. More specifically, a firstdiffraction beam of the movable diffraction grating 4 generated from afirst diffraction beam of the fixed diffraction grating 3 may be used,for example, as the light beam J as shown in FIG. 4.

As mentioned above, the diffraction angle θ₃ can be constant regardlessof changes in the temperature. Additionally, because the diffractionangle θ₃ is then equal to the incident angle θ₁, the twice-diffractedbeam J is always parallel to the twice-transmitted beam K. The beams Jand K are very stable with respect to the temperature, and this enablesdecreasing of the pitches A₁ and A₂ of the fixed diffraction grating 3and movable diffraction grating 4, resulting in an increase indiffraction efficiency and higher resolution.

If the light receiving element 7 has a light receiving surface smallerthan the interval of the interference fringes, or if a pin hole 8 havinga diameter smaller than the interval of the interference fringes isprovided in front of the light receiving element 7, the amount of lightreceived by the light receiving element 7 changes as shown in FIG. 6.Therefore, the displacement of the movable diffraction grating 4 can besensed by the output from the light receiving element 7 in accordancewith the change in amount of light received.

Instead of decreasing the pitches of the gratings, the resolution of theencoder can be increased using a higher order of diffraction. Forexample, instead of the first diffraction beam, the second orderdiffraction beam at the movable diffraction grating 4 generated from thesecond diffraction beam of the fixed diffraction grating 3 may be usedin the first embodiment.

The movable diffraction grating 4 needs a length longer than the lengthof the fixed diffraction grating 3 since the movable diffraction grating4 is moved. Accordingly, it is difficult to make the movable diffractiongrating 4 with a smaller pitch without faults, as compared with thefixed diffraction grating 3. In order to eliminate this problem, ahigher order of diffraction may be used with increased pitch of themovable diffraction grating 4. Specifically, the pitch A₂ of the movablediffraction grating 4 is formed twice as large as pitch A₁ of the fixeddiffraction grating 3, and the order of diffraction at the movablediffraction grating 4 is twice as high as the order of diffraction atthe fixed diffraction grating 3 so that the relationship (3) issatisfied.

FIG. 7 is an illustration of a variation of the first embodiment. In thefirst embodiment, the lens 5 is provided for condensing the light beamsJ and K which are parallel at the exit of the movable diffractiongrating 4. The variation shown in FIG. 7 has a lens (condenser lens) 9instead of the lens 5. The lens 9 is provided between the light source 1and the fixed diffraction grating 3 so as to collimate the light beamfrom the light source 1 and to condense two light beams J' and K'exiting from the movable diffraction grating 4.

In FIG. 7, the light beam emitted by the light source 1 is collimatedand condensed by the lens 9. The light beam is then incident on thefixed diffraction grating 3 to generate a diffraction beam which isconsequently incident on the movable diffraction grating 4. Thediffraction beam and the beam transmitted through the fixed diffractiongrating 3 exit from the movable diffraction grating 4. At this time, thebeams J' and K' are not parallel and are directed so that the two beamsconverge at the light receiving element 7 due to the condensing effectof the lens 9. In this variation, since only a single lens 9 is requiredas compared to the first embodiment, the encoder can be miniaturized insize.

It should be noted that the displacement of the movable diffractiongrating 4 can be realized utilizing polarization of the light beam usingrotation of polarization instead of the interference fringes utilized inthe above-mentioned embodiment and variation.

FIG. 8 is an illustration of an encoder utilizing rotation of apolarized beam. The encoder shown in FIG. 8 comprises polarizing plates11 and 12, a beam splitter 13, polarization beam splitters 14 and 16,λ/4 plate 15 and light receiving elements 17a and 17b. In this encoder,the diffraction gratings 3 and 4 have relatively larger pitches comparedto the wavelength of the beam, and it is particularly useful whenpolarization conditions of the beams J and K are the same as the beamsincident on the movable diffraction grating 4 or in a slightlyelliptically polarized condition.

In the encoder of FIG. 8, the polarizing plate 11 converts the twicetransmission beam K exiting from the movable diffraction grating 4 intoa linearly polarized beam (for example S-polarization). The beam K isthen incident on the polarization beam splitter 14 via the beam splitter13. The twice diffraction beam J which exits from the movablediffraction grating 4 is converted by the polarization plate 12 into alinearly polarized beam polarized in a direction perpendicular to thepolarization direction of the polarizing plate 11. The twice diffractionbeam J and the twice transmission beam K are superposed, and incident onthe λ/4 plate 15. The beams J and K are converted into circularlypolarized beam having rotations opposite to each other. The beams J andK are then incident on the polarization beam splitter 16. Since theoptical system the encoder is arranged so that optical paths between thefixed diffraction grating 3 and the polarization beam splitter 16 areequal to each other, the superposed beam comprising the beams J and K isincident on the polarization beam splitter 16 as an apparently linearlypolarized beam. If the movable diffraction grating 4 moves, thepolarization of the twice diffraction beam J is rotated, and accordinglythe polarization of the apparently linearly polarized beam is rotated.The polarization beam splitter 16 splits the beam incident on thepolarization beam splitter 16 into an S-polarization beam and aP-polarization beam. Each of the S-polarization beam and theP-polarization beam are received by the respective light receivingelements 17a and 17b. Because the ratio of the light intensities of theS-polarization beam and the P-polarization beam is proportional to therotation of the polarization of the beam incident on the polarizationbeam splitter 16, the displacement of the movable diffraction grating 4can be sensed by obtaining the ratio of outputs of the light receivingelements 17a and 17b. The signal obtained in accordance with the ratioof the outputs of the light receiving elements 17a and 17b is a completesine waveform, and thus an accurate sensing of a displacement of themovable diffraction grating 4 can be realized.

It should be noted that, instead of using the λ/4 plate 15, a polarizingplate having the polarization axis inclined 45 degrees from thepolarization direction of each of the beams J and K may be used so as toobtain the circularly polarized beams to be incident on the polarizationbeam splitter. In such a case, the manufacturing cost of the encoder canbe reduced.

FIGS. 9 and 10 show variations of the encoder utilizing rotation ofpolarization. The encoders shown in FIGS. 9 and 10 are adapted to a casewhere the pitches A₁ and A₂ of the gratings 3 and 4 are smaller than thewavelength of the beam emitted by the light source. If the pitches A₁and A₂ are smaller than the wavelength of the beam, a dependency onpolarization occurs wherein an S-polarization beam is diffracted while aP-polarization beam is transmitted. Accordingly, in the encoder shown inFIGS. 9 and 10, the beam J exiting from the movable diffraction grating4 is the S-polarization beam and the beam K exiting from the movablediffraction grating 4 is the P-polarization beam. This means that thegratings 3 and 4 themselves have a polarizing function. Accordingly, itis not necessary to provide the polarizing plates 11 and 12, the beamsplitter 13 and the polarization beam splitter 14 of the encoder shownin FIG. 8. In the case of FIG. 9, the twice diffraction beam J and thetwice transmission beam K are directly incident on the λ/4 plate 15. Inthe case of FIG. 10, the beams J and K are directly incident on apolarizing plate 18 which functions the same as the λ/4 plate 15 asmentioned above.

In the encoder of FIGS. 9 and 10, the number of parts can be reduced,and thus the encoder can be miniaturized.

FIG. 11 shows another variation of the first embodiment. In an encodershown in FIG. 11, similarly to the first embodiment shown in FIG. 4, twodiffraction gratings 23 and 24 parallel to each other are provided. Theencoder of FIG. 11 is not provided with the condenser lens 5, butinstead of that the pitch A₁ of the fixed diffraction grating 23 isslightly different from the pitch A₂ of the movable diffraction grating24. By doing so, the beams J and K are made to converge so that thebeams J and K can be condensed in one spot.

In the construction of FIG. 11, the above-mentioned expression (2) isalso established. An angle de between the beams J and K can be obtainedby the following expression.

    dθ=θ.sub.1 -θ.sub.3                      (4)

Supposing dθis extremely small, the above-mentioned expression (2) anexpressed as follows. ##EQU1##

According to the above, even if the order of diffraction at the gratings23 and 24 is the same, that is m is equal to n, the angle dθ can beprovided between the beams J and K. Additionally, the pitch A₀ of theinterference fringes formed by the beams J and K is given by thefollowing equation.

    sin (dθ/2)≈dθ/2=λ/2A.sub.0      (6)

By substituting dθ of the expression (6) in the expression (5), thefollowing expression is obtained.

    1/A.sub.0 =(n/A.sub.1 -m/A.sub.2)/cos θ.sub.1        (7)

According to the expression (7), it is understood that the pitch A₀ ofthe interference fringes is not related to the wavelength of the beamincident on the grating 23. Additionally, by multiplying the right sideand the left side of the expression (7) by W₀ cos θ₁, the followingexpression is obtained.

    (W.sub.0 /A.sub.0)*cos θ.sub.1 =nW.sub.0 /A.sub.1 -mW.sub.0 /A.sub.2( 8)

In the above expression (8), W₀ /A₀ represents the number of fringes, inthe beam spot diameter, formed by interference. nW₀ /A₁ and mW₀ /A₂represent the numbers of lines of gratings 23 and 24, in the beam spotdiameter, multiplied by the respective order of diffraction.Accordingly, the following expression can be obtained from theexpression (8).

    (number of fringes of interference)×cos θ=(order of diffraction)×(number of grids of fixed diffraction grating)-(order of diffraction)×(number of grids of movable diffraction grating)(9)

Accordingly, by setting the pitches A₁ and A₂ to appropriate values, anarbitrary number of fringes can be obtained. For example, in a conditionwhere the first diffraction beam is used (n=m=1) and =0.78 μm, θ₁ =45°,A₁ meets the Bragg condition, A₁ =λ2sin θ₁ =0.55154 μm and A₀ =1 mm, theexpression (7) becomes as follows.

    1/1000*cos 45°=1/0.55154-1/A.sub.2                  (10)

According to the above expression, A₂ can be calculated as 0.55176 μmwhich is only 0.04% different from A₁. By setting the spot diameter ofthe incident beam to approximately 2 mm, one or two fringes may beobserved within the spot diameter. Since the fringes are moved inaccordance with the movement of the movable diffraction grating 24, asine waveform signal as shown in FIG. 9 can be obtained by receiving thebeam with a single light receiving element 27.

According to the construction of the encoder shown in FIG. 11, largeinterference fringes can be formed within the collimated beam spot, andthus only a single light receiving element 27, which is appropriatelypositioned within the spot diameter, is needed to sense the intensitychange due to the interference fringes. Therefore, the condenser lens tocondense the beams to a light receiving element can be eliminated,resulting in easy adjustment of the light receiving element whichadjustment is required for an accurate measurement of the movement ofthe movable diffraction grating.

FIG. 13 shows an example in which the beams J and K are made to beconverge by setting the direction of the grating 4 being slightlyinclined (angle θ) from the direction of the grating 3. The pitch A₁ isequal to the pitch A₂. According to this construction, the beams J and Kare also made to converge.

It should be noted that although, in the above-mentioned embodiments andvariations thereof, the movable diffraction grating 4 or 24 is movedlinearly in the direction indicated by the arrow R so as to form alinear encoder, a rotary encoder can also be formed using the principleof the present invention.

FIGS.14 and 15 show examples of a rotary encoder using the principle ofthe present invention. The rotary encoder of FIG. 14 comprises the lightsource 1, the lens 2 which collimates the light beam emitted by thelight source 1, a fixed diffraction grating 33, a movable diffractiongrating 34 which is formed on a cylindrical surface, and a lightreceiving element 37. The movable diffraction grating 34 is rotatableabout the axis X. The rotary encoder of FIG. 15 comprises the lightsource 1, the lens 2 which collimates the light beam emitted by thelight source 1, a fixed diffraction grating 43, a movable diffractiongrating 44 which is formed on a plane circular surface, and a lightreceiving element 47. The movable diffraction grating 44 is rotatableabout the axis X. All the structures described with respect to thelinear encoder of FIGS. 4 through 11 may be applied to the rotaryencoders of FIGS. 14 and 15 with the same advantages mentioned above.

FIG. 16 is an illustration of a second embodiment of an encoderaccording to the present invention. The encoder of FIG. 16 comprises thelight source 1, the lens 2 which collimates the light beam emitted bythe light source 1, diffraction gratings 53 and 54 and a light receivingelement 57. The gratings 53 and 54 are arranged in parallel to eachother. The pitch A₁ of the grating 53 is slightly different from thepitch A₂ of the grating 54.

In the second embodiment, ±nth order diffraction beams are generated bythe fixed diffraction grating 53, and the diffraction beams are incidenton the movable diffraction grating 54. The movable diffraction grating54 generates the ±mth order diffraction beams of the ±nth orderdiffraction beams. Hereupon, ±nth (±mth) means the nth (mth) orderdiffraction beams directed to opposite sides of the optical axis of theincident beam. The interference fringes can be formed on the lightreceiving element 57 using the ±mth order diffraction beams which exitfrom the movable diffraction grating 54.

FIG. 17 is an illustration for explaining an example in which the firstdiffraction beams of the fixed diffraction grating and movablediffraction grating are used. In the construction shown in FIG. 14, thelight beam emitted by the light source 1 is collimated by the lens 2,and incident on the fixed diffraction grating 53. The first diffractionbeams are generated to either side of the optical axis of the incidentbeam. Hereinafter, for the sake of convenience, diffraction beamsdirected upward relative to the optical axis of the incident beam arerepresented by prefixing + (e.g. + first diffraction beam), anddiffraction beams directed downward relative to the optical axis of theincident beam are represented by prefixing - (e.g. - first diffractionbeam). The ± first diffraction beams are incident on the movablediffraction grating 54 so that ± first diffraction beams of the ± firstdiffraction light generated by the fixed diffraction grating 53 aregenerated. Among the first diffraction beams which exit from the movablediffraction grating 54, the first - diffraction beam E due to the +first diffraction beam of the fixed diffraction grating 53 and the +first diffraction beam F due to the - diffraction beam of the fixeddiffraction grating 53 are incident on the light receiving element 57.It should be noted that, in the second embodiment, since the pitches A₁and A₂ are slightly different from each other, the beams E and F are notparallel, and can be condensed on the light receiving element 57 aspreviously described. Accordingly the beams E and F can form theinterference fringes on the light receiving element 57.

A description will now be given, with reference to FIG. 15, of theprinciple of the second embodiment.

When a collimated beam is incident on the fixed diffraction grating 53in a direction perpendicular to the plane of the fixed diffractiongrating 53, the condition of diffraction at the fixed diffractiongrating 53 is represented by the following expression.

    sin θ.sub.1 =λ/A.sub.1                        (11)

Where θ₁ is the diffraction angle at the fixed diffraction grating 53;A₁ is the pitch of the fixed diffraction grating 53; λ is the wavelengthof the collimated beam from the light source 1.

The condition of diffraction at the movable diffraction grating 54 isrepresented by the following expression.

    -sin θ.sub.2 +sin θ.sub.1 =λ/A.sub.2    (12)

Where θ₂ is the diffraction angle at the movable diffraction grating 54;A₂ is the pitch of the movable diffraction grating 54; λ is thewavelength of the collimated beam from the light source 1.

According to the expressions (11) and (12), the following expression canbe obtained with respect to the diffraction angle θ₂ of the movablediffraction grating 54.

    sin θ.sub.2 =λ(1/A.sub.1 -1/A.sub.2)          (13)

The angle formed between beams E and F are twice the angle θ₂, and theinterference fringes having a pitch A₀ are generated in accordance withthe angle θ. The relationship between the pitch A₁ and the diffractionangle θ₂ is represented by the following expression.

    sin θ.sub.2 =λ/(2A.sub.0)                     (14)

using the expressions (13) and (14), the relationship among A₁, A₂ andA₃ is represented by the following expression.

1/(2A₀)=1/A₁ -1/A₂ (15)

Apparent from the expression (15), the pitch A₀ of the interferencefringes is related only to the pitch A₁ of the fixed diffraction grating53 and the pitch A₂ of the movable diffraction grating 54. That is, thepitch A₀ of the interference fringes is not related to the wavelength λof the light beam emitted by the light source 1. Accordingly, there isno effect related to temperature change even if a semiconductor laserhaving a relatively large wavelength fluctuation is used as the lightsource 1.

Additionally, supposing the beam diameter of the collimated beamincident on the fixed diffraction grating 53 is W₀, as shown in FIG. 19,and the right side and the left side of the expression (15) aremultiplied by W₀, the following expression is obtained.

    (W.sub.0 /A.sub.0)/2=W.sub.0 /A.sub.1 -W.sub.0 /A.sub.2    (16)

Where W₀ /A₀ is the number of interference fringes within the beamdiameter; W₀ /A₁ is the number of lines of the fixed diffraction grating53 within the beam diameter; W₀ /A₂ is the number of lines of themovable diffraction grating 54 within the beam diameter.

The following relationship is obtained in accordance with the expression(16).

    (number of interference fringes)/2=(number of grids of fixed diffraction grating within beam diameter)-(number of grids of movable diffraction grating within beam diameter)                             (17)

According to the relationship (17), it is understood that byappropriately setting the pitches A₁ and A₂, an arbitrary number ofinterference fringes can be obtained. For example, when using a highdensity grating such as A₁ =0.948 μm so as to obtain a high resolution,and when A₀ =1 mm is desired, A₂ should be set to 0.94768 μm which is0.03% different from A₁. Such gratings having slightly different pitchescan be made by the conventional technique. In the present case, if thebeam diameter of the collimated beam is 2 mm, one or two interferencefringes are observed within the beam diameter.

Since the interference fringes are moved according to a displacement ofthe movable diffraction grating 54, a sine waveform signal as shown inFIG. 20 can be obtained by receiving the beams E and F with the lightreceiving element 57 having a small light-receiving surface. If the +first diffraction beam and the - first diffraction beam are used asshown in FIG. 17, two periods of sine waveform signal are output fromthe light receiving element 57 during the movement corresponding to asingle pitch of the movable diffraction grating 54.

As mentioned above, the second embodiment of the present invention canperform an accurate measurement of the displacement of the movablediffraction grating regardless of temperature change. Additionally,large interference fringes can be formed within the collimated beamdiameter, and thus only a single light receiving element 57, which isappropriately positioned within the beam diameter, is needed to sensethe intensity change due to the interference fringes. Therefore, thecondenser lens to condense the beams E and F to a light receivingelement can be eliminated, resulting in easy adjustment of the lightreceiving element 57 which adjustment is required for an accuratemeasurement of the movement of the movable diffraction grating.

Although only the ± first diffraction beams are used in the encoder ofFIG. 17 so as to eliminate noise, a higher order diffraction beams maybe used so as to obtain a more accurate measurement because theresolution is proportional to the diffraction angle. The presentinvention can be applied to the case where a higher order diffractionbeams are used. In such a case, the condition of diffraction at thefixed diffraction grating 53 is represented by the following expression.

    sin θ.sub.1 =nλ/A.sub.1                       (18)

Where n is the order of diffraction; θ₁ is the diffraction angle at thefixed diffraction grating 53; A₁ is the pitch of the fixed diffractiongrating 53; λ is the wavelength of the collimated beam from the lightsource 1.

The condition of diffraction at the movable diffraction grating 54 isrepresented by the following expression.

    -sin θ.sub.2 +sin θ.sub.1 =mλ/A.sub.2   (19)

Where m is the order of diffraction; θ₂ is the diffraction angle at themovable diffraction grating 54; A₂ is the pitch of the movablediffraction grating 54; λ is the wavelength of the collimated beam fromthe light source 1.

According to the expressions (18) and (19), the following expression canbe obtained with respect to the diffraction angle θ₂ at the movablediffraction grating 54.

    sin θ.sub.2 =λ(n/A.sub.1 -m/A.sub.2)          (20)

Using the expressions (14) and (20), the relationship among A₁, A₂ andA₀ is represented by the following expression.

    1/(2A.sub.0)=n/A.sub.1 -m/A.sub.2                          (21)

Apparent from the expression (21), similarly to the case where only the± first diffraction beams are used, the pitch A₀ of the interferencefringes is related only to the pitch A₁ of the fixed diffraction grating53 and the pitch A₂ of the movable diffraction grating 54. That is, thepitch A₀ of the interference fringes is not related to the wavelength ofthe light beam emitted by the light source 1. Accordingly, there is noeffect related to temperature change even if a semiconductor laserhaving a relatively large wavelength fluctuation is used as the lightsource 1.

Additionally, supposing the beam diameter of the collimated beamincident on the fixed diffraction grating 53 is W₀, as shown in FIG. 19,and the right side and the left side of the expression (15) aremultiplied by W₀, the following expression is obtained.

    (W.sub.0 /A.sub.0)/2=nW.sub.0 /A.sub.1 -mW.sub.0/ A.sub.2  (22)

Where W₀ /A₀ is the number of interference fringes within the beamdiameter; nW_(0/) A₁ is the number of lines of the fixed diffractiongrating 53 within the beam diameter multiplied by the order ofdiffraction n; mW_(0/) A₂ is the number of lines of the movablediffraction grating 54 within the beam diameter multiplied by the orderof diffraction m. The following relationship is obtained in accordancewith the expression (22).

    (number of interference fringes)/2=(order of diffraction)×(number of lines of fixed diffraction grating within beam diameter)-(order of diffraction)×(number of lines of movable diffraction grating within beam diameter)                                            (23)

As mentioned above, higher order diffraction beams can be used so as toobtain a more accurate measurement than a case where the firstdiffraction beams are used, and thus in the present case a higherresolution of measurement can be obtained with the same effectsmentioned previously.

In the second embodiment and variation thereof, although the same orderof diffraction beams are used to form the interference fringes on thelight receiving element, different order of diffraction beams, that isbeams having different angles of diffraction, can be used in accordancewith the present invention.

FIG. 21 shows a case where the diffraction angle of the beam E isdifferent from the diffraction angle of the beam F. The beam E is the m₁th diffraction beam (diffraction angle θ₂) at the movable diffractiongrating 54 generated from the n₁ th diffraction beam (diffraction angleθ₁) at the fixed diffraction grating 53. The beam F is the m₂ thdiffraction beam (diffraction angle φ₂) at the movable diffractiongrating 54 generated from the n₂ th diffraction beam (diffraction angleφ₁) at the fixed diffraction grating 53. In this case, the followingrelation is established for the beam E.

    sin θ.sub.1 =n.sub.1 λ/A.sub.1                (24)

    -sin θ.sub.2 +sin θ.sub.1 =m.sub.1 λ/A.sub.2(25)

According to the expressions (24) and (25), the following expression canbe obtained with respect to the diffraction angle θ₂ at the movablediffraction grating 54.

    sin θ.sub.2 =λ(n.sub.1 /A.sub.1 -m.sub.1 /A.sub.2)(26)

Similarly, the following relationship is established for the beam F.

    sin φ.sub.2 =-λ(n.sub.2 /A.sub.1 -m.sub.2 /A.sub.2)(27)

Additionally, the pitch A₀ of the interference fringes is represented bythe following expression.

    A.sub.0 =λ/(sin θ.sub.2 +sin φ.sub.2)     (28)

Using the expressions (26), (27) and (28), the following relationship isobtained among A₁, A₂ and A₀.

    A.sub.0 =1/[(n.sub.1 -n.sub.2)/A.sub.1 -(m.sub.1 -m.sub.2)/A.sub.2 ](29)

It is understood from the expression (29) that in the present case, thepitch A₀ of the interference fringes is related, similarly to thepreviously described embodiment, only to the pitch A₁ of the fixeddiffraction grating 53 and the pitch A₂ of the movable diffractiongrating 54. Therefore, the interference fringes are not affected by afluctuation of the wavelength of the light beam emitted by the lightsource 1, and thus a semiconductor laser having a relatively longwavelength can be used as the light source 1.

In the present case, an arbitrary number of interference fringes can beformed by setting A₁, A₂, n₁, n₂, m₁ and m₂ to appropriate values. If alight receiving element having a light receiving surface smaller thanthe pitch A₀ of the interference fringes is used, a sine waveform signalis obtained from the output of the light receiving element. When the m₁th (or m₂ th) order diffraction beam and a transmission beam(corresponding to m₁ or m₂ equal to 0) at the movable diffractiongrating 54 are used, a phase shift is generated in the directionopposite to the moving direction of the movable diffraction grating 54.The number of complete cycles (periods) of the sine waveform equal totwice the order of diffraction (2|m₁ | or 2|n₁ |) at the moving gratingcan be obtained. In the present case, since the m₁ th diffraction beamis used at the moving grating (movable diffraction grating 54), thenumber of periods is 2|m₁ |.

In order to obtain generally parallel beams exiting from the movablediffraction grating 54, in a condition where A₁ 32 A₀ for example, thefollowing relationship must be satisfied.

    n.sub.1 +m.sub.1 =n.sub.2 +m.sub.2                         (30)

For example, the interference occurring between the transmission beam ofthe movable diffraction grating 54 coming from the + first diffractionbeam at the fixed diffraction grating 53 and the - second diffractionbeam at the movable diffraction grating 54 coming from the + thirddiffraction beam at the fixed diffraction grating 53 satisfies the aboverelationship (30) since 1+0=-2+3, and therefore this combination ofbeams can be used. In this case the resolution is three times as high asthe case where the first diffraction beams are used since three periods(m₁ +m₂ =0+3=3) of the sine waveform signal are obtained.

Additionally, using the higher order diffraction beams, a relativelylarge difference between the pitches A₁ and A₂ can be obtained.Specifically, in a case where the pitch A₁ of the fixed diffractiongrating 53 is as small as 1 μm and the pitch A₀ of the interferencefringes is as large as 2 mm (corresponding to the beam diameter of thecollimated beam), if n₁ =1, n₂ =-1, m₁ 32 -2 and m₂ 32 2, the pitch A₂of the movable diffraction grating 54 can be 2.0005 μm, which is twiceas large as the pitch A₁, Therefore, the pitch A₂ of the movablediffraction grating, which requires a large pitch compared to the pitchA₁ of the fixed diffraction grating due to its size, can be large enoughto eliminate problems in the precision manufacturing of the movablediffraction grating.

It should be noted that although, in the above-mentioned embodiment andvariations thereof, the movable diffraction grating 54 is moved linearlyin the direction indicated by the arrow R so as to form a linearencoder, a rotary encoder can also be formed using the principle of thepresent invention.

FIGS. 22 and 23 show examples of a rotary encoder using the principle ofthe present invention. The rotary encoder of FIG. 22 comprises the lightsource 1, the lens 2 which collimates the light beam emitted by thelight source 1, a fixed diffraction grating 63, a movable diffractiongrating 64 which is formed on a cylindrical surface, and a lightreceiving element 67. The movable diffraction grating 64 is rotatableabout the axis X. The rotary encoder of FIG. 23 comprises the lightsource 1, the lens 2 which collimates the light beam emitted by thelight source 1, a fixed diffraction grating 73, a movable diffractiongrating 74 which is formed on a flat circular surface, and a lightreceiving element 77. The movable diffraction grating 74 is rotatableabout the axis X. In the rotary encoder shown in FIGS. 22 and 23, themovement (displacement) information, including amount of rotation androtation speed, of the movable diffraction grating can be obtainedwithout having a condenser lens. Further, all the structures describedwith respect to the linear encoder of FIGS. 16 through 21 may be appliedto the rotary encoders of FIGS. 14 and 15 with the same advantagesmentioned previously.

A description will now be given of a third embodiment of an encoderaccording to the present invention. FIG. 24 is an illustration showing astructure of the third embodiment according to the present invention.The third embodiment comprises, in addition to the second embodimentshown in FIG. 16 or FIG. 21, reflecting means (a mirror) 81 andsplitting means (a beam splitter) 82. The mirror 81 is arranged on theopposite side of the fixed diffraction grating 53 with respect to themovable diffraction grating 54 so that the beams exiting from themovable diffraction grating 54 are reflected toward the movablediffraction grating 54. The beam splitter θ₂ is provided between thelens 2 and the fixed diffraction grating 53. It should be noted that thereflecting means 81 may be integrally formed with the movablediffraction grating 54 on the opposite side of the fixed diffractiongrating 53.

In the above-mentioned structure, the collimated beam collimated by thelens 2 transmits through the splitting means 82, and is incident on thefixed diffraction grating 53 and, in turn, the movable diffractiongrating 54. The collimated beam is split by the splitting means, and thesplit collimate beam is directed to the light receiving element 7. Thediffraction beams exiting from the movable diffraction grating 54 arereflected by the reflecting means 81, and return to the splitting meansθ₂ via the movable diffraction grating 54 and fixed diffraction grating53. The returning beam is then split by the splitting means θ₂ and thesplit returning beam is received by the light receiving element 7.Accordingly, interference fringes are formed on the light receivingelement 7 by the split collimated beam and the split returning beam.

The optical system shown in FIG. 24 is equivalent to an optical systemshown in FIG. 25. A description will now be given, with reference toFIG. 25, of conditions of the diffraction beams of FIG. 24. In thiscase, interference fringes are formed by the beams E and F similarly tothe second embodiment mentioned previously.

The beam E is a m₁ th diffraction beam, at a grating having the pitchA₂, of the n₁ th diffraction beam of the collimate beam incident on thegrating having the pitch A₁. The beam F is a m₂ th diffraction beam, ata grating having the pitch A₂, of the n₂ th diffraction beam of thecollimate beam incident on the grating having the pitch A₁.

Supposing, for the sake of convenience of description, the collimatebeam is incident on the fixed diffraction grating 53 in a directionperpendicular to the surface of the fixed diffraction grating 53, thefollowing expressions are established.

    sin θ.sub.1 =n.sub.1 λ/A.sub.1                (31a)

    sin θ.sub.1 -sin θ.sub.2 =m.sub.1 λ/A.sub.2(31b)

    sin θ.sub.2 +sin θ.sub.3 =m.sub.1 λ/A.sub.2(31c)

    sin θ.sub.3 +sin θ.sub.4 =n.sub.1 λ/A.sub.1(31d)

According to the expressions (31a) through (31d), the followingexpression can be obtained with respect to the diffraction angle θ₄.

    sin θ.sub.4 =2λ(n.sub.1 /A.sub.1 -m.sub.1 /A.sub.2)(32)

Similarly, the following relationship is established for the beam F.

    sin φ.sub.4 =2λ(n.sub.2 /A.sub.1 -m.sub.2 /A.sub.2)(33)

Additionally, the pitch A₀ of the interference fringes is represented bythe following expression.

    A.sub.0 =λ/(sin θ.sub.4 +sin φ.sub.4)     (34)

Using the expressions (32), (33) and (34), the following relationship isobtained among A₁, A₂ and A₀.

    A.sub.0 =1/[2((n.sub.1 -n.sub.2)/A.sub.1 -(m.sub.1 -m.sub.2)/A.sub.2)](35)

It is understood from the expression (35) that in the present case, thepitch A₀ of the interference fringes is related, similarly to thepreviously described embodiment, only to the pitch A₁ of the fixeddiffraction grating 53 and the pitch A₂ of the movable diffractiongrating 54. Therefore, the interference fringes are not affected by afluctuation of the wavelength of the light beam emitted by the lightsource 1.

In the present case, an arbitrary number of interference fringes can beformed by setting A1, A₂, n₁, n₂, m₁ and m₂ to appropriate values. If alight receiving element 7 having a light receiving surface smaller thanthe pitch A₀ of the interference fringes is used, a sine waveform signalis obtained from the output of the light receiving element 7. When them₁ th (or m₂ th) order diffraction beam at the movable diffractiongrating 54 is used, a phase shift is generated in the direction oppositeto the moving direction of the movable diffraction grating 54. Becausethe beam is diffracted twice at the movable diffraction grating 54,complete periods of sine waveform corresponding in number to four timesthe order of diffraction (4|m₁ | or 4|m₂ |) at the movable diffractiongrating can be obtained. This results in that the resolution ofmeasurement is four times that of the encoder shown in FIG. 21.

In the first and second embodiments, only a point light source can beused such as a semiconductor laser or a light emitting diode having alight emitting surface diameter smaller than 10 μm. On the other hand,the third embodiment is able to be provided with a light emitting diodehaving a wide light-emitting surface, which diode does not provide apoint light source. When the light source 1 comprises a point lightsource such as a semiconductor laser, as shown in FIG. 26A, the beams Eand F can form appropriate interference fringe because the origin of thebeams E and F is the same. On the other hand, if the light source 1comprises a light emitting element having a wide light-emitting surface,as shown in FIG. 26B, appropriate interference fringes are not formedbecause the origin of the beams E and F are not the same. Therefore, thelight emitting diode having a wide light-emitting surface cannot be usedfor the first and second embodiments.

On the other hand, in the third embodiment, since the beams E and F aregenerated always from the same collimate beam, an appropriateinterference fringes are always formed even if the light emitting diodehaving a wide light-emitting surface is used as the light source 1.

FIG. 27 is an illustration of a structure of a variation of the encodershown in FIG. 24. In the encoder shown in FIG. 24, reflecting means 84is provided on the movable diffraction grating 54 instead of thereflecting means 81 of FIG. 24. The reflecting means 84 comprises a thinmetal film such as aluminum formed by means of vapor deposition,sputtering or the like on the surface of the movable diffraction grating54. In the present variation, the pitch A₂ of the movable diffractiongrating 54 is approximately one half of the pitch A₁ of the fixeddiffraction grating 53.

In the above-mentioned variation, the beam emitted by the light source 1undergoes diffraction twice at the fixed diffraction grating 53, andonce at the movable diffraction grating 54. The pitch A₀ of theinterference fringes formed on the light receiving element isrepresented by the following expression.

    A.sub.0 =1/[2(n.sub.1 -n.sub.2)/A.sub.1 -(m.sub.1 -m.sub.2)/A.sub.2 ](36)

The expression (36) is obtained as follows. For the sake of convenienceof description, it is supposed that the ± first diffraction beams areused as n₁, n₂, m₁ and m₂. The expression (35) is transformed asfollows. ##EQU2##

In the above-mentioned variation, when the grating having the pitch A₁is moved, periods of sine waveform corresponding in number to four timesthe order of diffraction at the moving grating is obtained while thegrating moves by one pitch. When the grating having the pitch A₂ ismoved, periods of sine waveform corresponding in number to twice theorder of diffraction at the moving grating is obtained while the gratingmoves by one pitch. Although the number of periods is one half of thatof the encoder shown in FIG. 24, the resolution is four times that ofthe first and second embodiments since the pitch A₂ is approximately onehalf of the pitch A₁.

Additionally, thanks to the reflection means 84, a light emitting diodehaving a wide light-emitting surface can be used as the light source aspreviously described.

It should be noted that although the beam transmitted through the beamsplitter 82 directed to the gratings 53 and 54, the split beam may bedirected to the gratings 53 and 54. In this case the light receivingelement should be arranged on the transmission side of the beam splitter82.

A description will now be given, with reference to FIG. 28, of a fourthembodiment of an encoder according to the present invention. The encodershown in FIG. 28 comprises a third diffraction grating 86 in addition tothe encoder shown in FIG. 24. In this case the gratings 53 and 54 arefixed, and the grating 86 is movable.

The optical system shown in FIG. 28 is equivalent to an optical systemshown in FIG. 29. In the present embodiment, interference fringes areformed by the beams E and F similarly to the third embodiment previouslymentioned with reference to FIG. 25. The generating process of the beamsE and F is also similar to the third embodiment except that morediffractions are employed in the present embodiment, and descriptionsthereof will be omitted. It should be noted that the pitch of the thirdgrating is referred to as A₃, and l₁ and l₂ represent orders ofdiffraction at the grating 86.

Supposing, for the sake of convenience of description, the collimatebeam is incident on the fixed diffraction grating 53 in a directionperpendicular to the surface of the fixed diffraction grating 53, thefollowing expressions are established.

    sin θ.sub.1 =n.sub.1 λ/A.sub.1                (38a)

    sin θ.sub.1 +sin θ.sub.2 =m.sub.1 /A.sub.2     (38b)

    sin θ.sub.2 +sin θ.sub.3 =l.sub.1 /A.sub.3     (38c)

    -sin θ.sub.3 +sin θ.sub.4 =l.sub.1 /A.sub.3    (38d)

    sin θ.sub.4 +sin θ.sub.5 =m.sub.1 /A.sub.2     (38e)

    sin θ.sub.5 +sin θ.sub.6 =n.sub.1 /A.sub.1     (38f)

According to the expressions (38a) through (38f) the followingexpression can be obtained with respect to the diffraction angle θ₄.

    sin θ.sub.6 =2λ(n.sub.1 /A.sub.1 -m.sub.1 /A.sub.2 +l.sub.1 /A.sub.3)                                                 (39)

Similarly, the following relationship is established for the beam F.

    sin φ.sub.6 =2λ(n.sub.2 /A.sub.1 -m.sub.2 /A.sub.2 +l.sub.2 /A.sub.3)                                                 (40)

Additionally, the pitch A₀ of the interference fringes is represented bythe following expression.

    A.sub.0 =λ/(sin θ.sub.6 +sin φ.sub.6)     (41)

Using the expressions (39), (40) and (41), the following relationship isobtained among A₁, A₂ and A₀.

    A.sub.0 =1/[2((n.sub.1 -n.sub.2)/A.sub.1 -(m.sub.1 -m.sub.2)/A.sub.2)+(l.sub.1 -l.sub.2)/A.sub.3)]           (42)

It is understood from the expression (42) that in the present case, thepitch A₀ of the interference fringes is related, similarly to thepreviously described embodiment, only to the pitch A₁ and A₂ of thefixed diffraction gratings 53 and 54 and the pitch A₃ of the movablediffraction grating 86. Therefore, the interference fringes are notaffected by a fluctuation of the wavelength of the light beam emitted bythe light source 1. Similarly to the third embodiment mentioned above, aphase shift of the interference fringes is generated in the directionopposite to the moving direction of the grating which is moved. Becauseeach of the gratings 53, 54 and 86 are passed twice, complete periods ofsine waveform corresponding to twice the order of diffraction (2(|m₁|+|m₂ |) or 2(|n₁ |+|n₂ |) or 2(|l₁ |+|l₂ |)) can be obtained.

It should be noted that similarly to the third embodiment, a lightemitting diode having a wide light-emitting surface can be used as thelight source 1.

FIG. 30 is an illustration of a structure of a variation of the encodershown in FIG. 28. In the encoder shown in FIG. 24, similarly to theencoder of FIG. 27, reflecting means 84 is provided on the movablediffraction grating 86 instead of the reflecting means 81 of FIG. 24.The reflecting means 84 comprises a thin metal film such as aluminumformed by means of vapor deposition, sputtering or the like on thesurface of the movable diffraction grating 86. In the present variation,the pitch A₃ of the movable diffraction grating 86 is approximately onehalf of the pitch A₁ and A₂ of the fixed diffraction gratings 53 and 54.

In the above-mentioned variation, the beam emitted by the light source 1experiences the fixed diffraction grating 53 twice, the fixeddiffraction grating 54 twice and the movable diffraction grating 86once. The pitch A₀ of the interference fringes formed on the lightreceiving element 7 is represented by the following expression.

    A.sub.0 =1/[2(n.sub.1 -n.sub.2)/A.sub.1 -(m.sub.1 -m.sub.2)/A.sub.2 +(l.sub.1 -l.sub.2)/A.sub.3]                              (43)

The expression (43) is obtained as follows. For the sake of convenienceof description, it is supposed that the ± first diffraction beams areused as n₁, n₂, m₁, m₂, l₁ and l₂. The expression (42) is transformed asfollows. ##EQU3##

According to the expression (44), the expression (43) can be obtained.

In the above-mentioned variation, when the grating having the pitch A₁or A₂ is moved, periods of sine waveform corresponding to two times theorder of diffraction at the moving grating is obtained while the gratingmoves one pitch. When the grating having the pitch A₃ is moved, periodsof sine waveform corresponding in number to the order of diffraction atthe moving grating is obtained while the grating moves by one pitch.Although the number of periods is one half of that of the encoder shownin FIG. 28, the resolution is four times that of the first and secondembodiments since the pitch A₃ is approximately one half of the pitch A₁or A₂.

Additionally, thanks to the reflection means 84, a light emitting diodehaving a wide light-emitting surface can be used as the light source aspreviously described.

It should be noted that although three gratings are provided in thefourth embodiment, an encoder having more than three gratings may beformed.

It should be noted that although, in the above-mentioned third andfourth embodiments and variations thereof, the movable diffractiongrating 54 or 86 is moved linearly in the direction indicated by thearrow R so as to form a linear encoder, a rotary encoder can also beformed using the principle of the present invention.

FIGS. 31 through 38 show examples of a rotary encoder using theprinciple of the present invention. The rotary encoders shown in FIGS.31 and 32 are provided with reflecting means 81 on the side of arotatable diffraction grating 64 or 74 opposite to a fixed diffractiongrating 63 or 73, and thus these encoders correspond to the encodershown in FIG. 24. The rotary encoders shown in FIGS. 33 and 34 areprovided with reflecting means integrally formed with the rotatablediffraction grating 64 or 74, and thus these encoders correspond to theencoder shown in FIG. 27. The rotary encoders shown in FIGS. 35 and 36are provided with a third diffraction grating 86 and reflecting means 81on the side of a rotatable diffraction grating 64 or 74 opposite to afixed diffraction grating 63 or 73, and thus these encoders correspondto the encoder shown in FIG. 28. The rotary encoders shown in FIGS. 37and 38 are provided with the diffraction grating 86 having reflectingmeans 84 integrally formed with the grating 86 on the side of arotatable diffraction grating 64 or 74 opposite to a fixed diffractiongrating 63 or 73, and thus these encoders correspond to the encodershown in FIG. 30.

It should be noted that, in the above-mentioned embodiments andvariations, it is preferable to select diffraction beams which are asparallel as possible so as to form interference fringes having a largepitch so that the light receiving element can be as large as possible,enabling an easy arrangement of the light receiving element.

When using higher order diffraction beams, there is no wavelengthdependency of the type mentioned above, however, the phase of theinterference fringes has a wavelength dependency. In order to eliminatethis wavelength dependency for the phase, two beams forming theinterference fringes should be of the same order of diffraction. Amongthe orders of diffraction beams, the first diffraction beam provides apreferable result.

For example, in the case of the encoder shown in FIG. 21, if n₁ =1, n₂=-1, m₁ =1, m₂ =-1 and A₁ =1 μm, and in order to have A₀ =2 mm, A₂should be 1.00025 μm. The difference between A₁ and A₂ is approximately0.025%.

In the case of the encoder shown in FIG. 24, if n₁ 32 1, n₂ =-1, m₁ =1,m₂ =-1 and A₁ =1 μm, and in order to have A₀ =2 mm, A₂ should be1.000125 μm.

In the case of the encoder shown in FIG. 27, if n₁ =1, n₂ =-1, m₁ =1, m₂=-1 and A₁ =1 μm, and in order to have A₀ =2 mm, A₂ should be 0.5000625μm.

In the case of the encoder shown in FIG. 28, if n₁ =1, n₂ =-1, m₁ =1, m₂=-1, A₁ =1 μm and A₂ =0.5 μm, and in order to have A₀ =2 mm, A₃ shouldbe 0.999875 μm.

A description will now be given, with reference to FIGS.39 through 45,of displacement information obtaining means according to the presentinvention. In the above-mentioned embodiments and variations, the lightreceiving element outputs a sine waveform signal when the movablediffraction grating is moved. It is preferred that the sine waveformsignal has a high aspect ratio (ratio of a peak level and a bottomlevel: t₂ /t₁). When the sine waveform signal is formed by a singlelight-receiving element, the signal cannot have a good quality (that isa high aspect ratio) because the signal has a bias component t₁.

In the description below, the displacement information obtaining meansis described basically in conjunction with the structure of the encodershown in FIG. 16.

FIG. 39 shows a structure in which two light-receiving elements 58 and59 are provided to receive the beams forming interference fringes. Thelight receiving elements 58 and 59 are formed and arranged so that whena dark area and a bright area of the interference fringes are formedwithin the diameter of the beam received by the light receivingelements, one of the light receiving elements 58 and 59 receives thedark area while the other one receives the bright area. That is, thelight receiving elements 58 and 59 are apart from each other by adistance corresponding to one half of the pitch of the interferencefringes. A sine waveform signal can be obtained from the differencebetween the outputs from light receiving elements 58 and 59.

FIG. 40 shows the relationship between the outputs O1 and O2 from thelight receiving elements 58 and 59 and the sine waveform signal (O1-O2)obtained according to the difference between the outputs O1 and O2. Ascan be seen in FIG. 40, the outputs O1 and O2 have phases shifted by180° from each other. Accordingly, by taking the difference between theoutputs O1 and O2, a bias component can be eliminated, and thus a sinewaveform signal (O1-O2) having a high aspect ratio is obtained.Additionally, in this case, as shown in FIG. 41, if the width H of eachof the light receiving elements 58 and 59 is smaller than one half ofthe pitch of the interference fringes, a more complete sine waveformsignal may be obtained. However, since the amount of received light isdecreased as the width H is decreased, an appropriate design should beperformed depending on applications thereof.

The light receiving elements 58 and 59 may be arranged, as shown in FIG.42, so that the elements 58 and 59 are apart a distance corresponding toone quarter of the pitch of the interference fringes. FIG. 43 shows arelationship among the outputs O1 and O3 from the light receivingelements 58 and 59 and the sine waveform signal (O1-O3) obtainedaccording to the difference between the outputs O1 and O3. As can beseen in FIG. 43, the outputs O1 and O3 have phases shifted by 90° fromeach other. These outputs O1 and O3 correspond to the A-phase signal andB-phase signal used in a typical encoder, respectively. Accordingly, bytaking a difference between the outputs O1 and O3, a bias component canbe eliminated, and thus a complete sine waveform signal (O1-O3) having ahigh aspect ratio is obtained. Additionally, in this case, as generallyperformed in conventional encoders, the output O1 (A-phase signal) andthe output O3 (B-phase signal) can be used for determining movingdirection of the movable diffraction grating.

In order to obtain a further improved signal

66 having a high aspect ratio, three light-receiving elements 60, 61 and62 may be provided, as shown in FIG. 44, so that the three elements areapart from each other a distance corresponding to one quarter of thepitch of the interference fringes. FIG. 45 shows the relationshipbetween the outputs O1, O2 and O3 from the light receiving elements 60,61 and 62 and the sine waveform signals (O1-O3) and (O3-O2) obtainedaccording to the difference between the outputs O1 and O3 and thedifference between the outputs O3 and O2. As can be seen in FIG. 45, theoutputs O1, O2 and O3 have phases shifted by 90° from each other. Thesine waveform signals (O1-O3) and (O3-O2) correspond to the A-phasesignal and B-phase signal used in a typical encoder, respectively.Accordingly, complete sine waveform signals (O1-O3) and (O3-O2) having ahigh aspect ratio are obtained, which signals are used for determiningthe moving direction of the movable diffraction grating.

Additionally, in the encoders described above, at least one of thegratings 53, 54 and 86 may be formed, as shown in FIG. 46A, so that thegrating comprises two areas u_(a) and u_(b) having lines shifted inphase. That is, the pitches of the lines of the areas u_(a) and u_(b)are the same but the phase of the lines of the area u_(a) is shifted byβ₀ from that of the area u_(b). According to the above configuration ofthe grating, two kinds of interference fringes I_(a) and I_(b) havingthe same pitch with shifted phase are obtained. Accordingly, twodifferent output signals are obtained by arranging two light-receivingelements 7a and 7b to correspond to the interference fringes I_(a) andI_(b). The width of each of the light-receiving elements is less thanthe width of the areas u_(a) and u_(b). Additionally, the phase shift β₀is preferably 2π/(4|m₁ -m₂ |) or 2π/(4|n₁ -n₂ |), where n₁ and n₂ and m₁and m₂ are the orders of diffraction at the areas u_(a) and u_(b),respectively.

Supposing the second grating 54 has those areas, u_(a) and u_(b), andthe ± first diffraction beams generated at the first diffraction grating53 are used, and the ± first diffraction beams generated at the seconddiffraction grating 54 are used, the phase shift β₀ is preferably set to2π/8. In such a case where the ± first diffraction beams of the seconddiffraction grating 54 are used, a phase shift β₁ of the interferencefringes I_(a) and I_(b) is twice the phase shift β₀

    β.sub.1 =2β.sub.0                                (45)

When β₀ is set to 2π/8, the phase shift between the interference fringesI_(a) and I_(b) is 2π/4, and thus two different sine waveform signals(corresponding to the A-phase signal and B-phase signal) having phasesshifted 90° from each other are obtained. Accordingly, as previouslydescribed, moving direction information as well as displacementinformation can be obtained using the outputs of the light receivingelements 7a and 7b.

It should be noted that, in the encoder shown in FIG. 42, the A-phasesignal and the B-phase signal are obtained from a single series ofinterference fringes. Accordingly, if there is an offset or aninclination of the interference fringes, phases of the A-phase signaland the B-phase signal tend to be shifted, and thus a detection errormay easily occur. On the other hand, in the case where the A-phasesignal and the B-phase signal are obtained from two interference fringesas described with reference to FIGS. 46A and 46B, the detection errordue to an inclination of the interference fringes can be reduced.

In this case, higher order diffraction beams may be used, as in theencoder shown in FIG. 47, than using the first diffraction beams. In thecase shown in FIG. 47, the diffraction condition at the firstdiffraction grating 53 is represented as follows.

    sin θ.sub.11 =n.sub.1 λ/A.sub.1               (46a)

    sin θ.sub.12 =n.sub.2 λ/A.sub.1               (46b)

The diffraction condition at the second diffraction grating isrepresented as follows.

    -sin θ.sub.21 +sin θ.sub.11 =m.sub.1 λ/A.sub.2(47a)

    -sin θ.sub.22 +sin θ.sub.12 =m.sub.2 λ/A.sub.2(47b)

According to the expressions (46a), (46b), (47a) and (47b), thefollowing expression can be obtained.

    sin θ.sub.21 =λ(m.sub.1 /A.sub.2 -n.sub.1 /A.sub.1)(48a)

    sin θ.sub.22 =λ(m.sub.2 /A.sub.2 -n.sub.2 /A.sub.1)(48b)

Additionally, the pitch A₀ of the interference fringes formed by thebeams having the angles θ₂₁ and θ₂₂ is represented by the followingexpression.

    A.sub.0 =λ/(sin θ.sub.21 +sin θ.sub.22) (49)

Using the expressions (48) and (49), the following relationship isobtained among A1, A₂ and A₀.

    A.sub.0 =1/[(m.sub.1 +m.sub.2)/A.sub.2 -(n.sub.1 +n.sub.2)/A.sub.1 ](50)

It is understood from the expression (50) that in the present case, thepitch A₀ of the interference fringes is related, similarly to thepreviously described embodiment, only to the pitch A₁ of the firstdiffraction grating 53 and the pitch A₂ of the second diffractiongrating 54. Therefore, the interference fringes are not affected by afluctuation of the wavelength of the light beam emitted by the lightsource 1, and thus a semiconductor laser having a relatively longwavelength can be used as the light source 1.

It should be noted that in order to obtain generally parallel beamsexiting from the second diffraction grating 54, in a condition where A₁=A₀ for example, the previously described relationship (30) must besatisfied.

Additionally, in the case where the m₁ th diffraction beam and the m₂ thdiffraction beam at the second grating 54 are used, the phase shiftbetween the interference fringes is (m₁ -m₂) times the phase shift ofthe second diffraction grating 54, and thus the following expression isobtained.

    β.sub.1 =(m.sub.1 -m.sub.2)β.sub.0               (51)

If β₁ =π/2, β₀ =π/[2(m₁ -m₂)]

In the encoder shown in FIGS. 46A and 46B, the sine waveform signalsoutput from the light receiving elements 7a and 7b have a bias componentt₁, and thus detection error may occur due to a low aspect ratio. Inorder to eliminate this problem the configuration of the light receivingelements described with reference to FIG. 39 and FIG. 42 may be applied,as shown in FIG. 48, to the configuration of the light receivingelements shown in FIG. 46B.

FIG. 49 shows a relationship among the outputs a₁ and a₂ from the lightreceiving elements 7a and 8a and a difference (a₁ -a₂). FIG. 49corresponds to FIG. 40, and thus the advantages described with referenceto FIG. 40 can be applied to the encoder having the configuration shownin FIG. 48. Outputs b₁ and b₂ from the light receiving elements 8a and8b and the difference (b₁ -b₂) are the same as that shown in FIG. 49.The relationship between the difference (a₁ -a₂) and (b₁ -b₂) is shownin FIG. 50. According to the present case, an improved A-phase signaland B-phase signal having a 90° phase shift from each other areobtained, and thus moving direction information and displacementinformation can be obtained with high accuracy. Additionally, asdescribed with reference to FIG. 41, widths H of the light receivingelements 7a, 8a, 7b and 8b may be reduced so as to obtain furtherreduced bias component.

It should be noted that, in the above-mentioned embodiments andvariations thereof having two diffraction gratings, either one of thegratings may be a movable diffraction grating while the other grating ismade to be a fixed diffraction grating. Similarly, in theabove-mentioned embodiments and variations thereof having threediffraction gratings, any one of the gratings may be a movablediffraction grating while the other gratings are made to be fixeddiffraction gratings.

Additionally, the present invention can be applied in a case where thelight beam emitted by the light source 1 is incident on the firstdiffraction grating from a direction not perpendicular to the surface ofthe grating.

The present invention is not limited to the specifically disclosedembodiments, and variations and modifications may be made withoutdeparting from the scope of the present invention.

What is claimed is:
 1. An optical encoder comprising:a light sourceemitting a light beam; a first grating to which said light beam emittedby said light source is directed, said first grating having a uniformpitch over an entire area of the first grating; a second grating towhich light beams exiting from said first grating are directed, saidsecond grating having a uniform pitch over an entire area of the secondgrating; and displacement information obtaining means for obtaininginformation on a displacement and a moving direction of one of saidfirst and second gratings, said information being obtained according toa combination of a twice-diffracted beam and a twice-transmitted beam atsaid second grating, said twice-diffracted beam being generated from adiffraction beam generated at said first grating, said twice-transmittedbeam being a transmission beam which has been transmitted through saidfirst grating and said second grating, said information being obtainedin accordance with interference fringes formed by said twice-diffractedbeam and said twice-transmitted beam.
 2. The optical encoder as claimedin claim 1, wherein said light source comprises a semiconductor laser.3. The optical encoder as claimed in claim 1, wherein said first gratinghas a pitch the same as that of said second grating, and said firstgrating and said second grating are arranged parallel to each other. 4.The optical encoder as claimed in claim 1, wherein said displacementinformation obtaining means obtains said information in accordance withinterference fringes formed by said twice-diffracted beam and saidtwice-transmitted beam.
 5. The optical encoder as claimed in claim 3,further comprising converging means, provided for converging saidtwice-diffracted beam and said twice-transmitted beam before said twicediffracted beam and said twice-transmitted beam enter into saidinformation obtaining means.
 6. The optical encoder as claimed in claim5, wherein said converging means is provided between said second gratingand said displacement information obtaining means.
 7. The opticalencoder as claimed in claim 5, wherein said converging means is providedbetween said light source and said first grating.
 8. The optical encoderas claimed in claim 3, wherein a direction of lines of said firstgrating is slightly different from a direction of lines of said secondgrating.
 9. The optical encoder as claimed in claim 1, wherein a pitchof said first grating is slightly different from a pitch of said seconddiffraction grating.
 10. An optical encoder comprising:a light sourceemitting a light beam; a first grating to which said light beam emittedby said light source is directed, a first and a second nth orderdiffraction beams being generated at said first grating, where n is aninteger, said first nth order diffraction beam being directed to theopposite side, relative to the second nth order diffraction beam, of thelight beam emitted by said light source, said first grating having auniform pitch over an entire area of the first grating; a second gratingto which said first and second nth order diffraction beams exiting fromsaid first grating are directed, a first and a second-mth orderdiffraction beams being generated from said first and second nth orderdiffraction beams at said second grating, where m is an integer, saidfirst mth order diffraction beams being directed to the opposite side,relative to the second nth order diffraction beam, of the optical axisof the respective first and second nth order diffraction beams, saidsecond grating having a pitch slightly different from a pitch of saidfirst grating, said second grating having a uniform pitch over an entirearea of the second grating; and displacement information obtaining meansfor obtaining information on a displacement and a moving direction ofone of said first and second gratings, said information being obtainedaccording to a movement of interference fringes formed by said first andsecond mth order diffraction beams exiting from said second grating. 11.The optical encoder as claimed in claim 10, wherein said interferencefringes used for obtaining said information are formed by said secondmth order diffraction beam, at said second grating, of said first nthdiffraction beam at said first grating and said first mth diffractionbeam, at said second grating, of said second nth diffraction beam atsaid first grating.
 12. The optical encoder as claimed in claim 1,wherein one of said first and second gratings comprises a first area anda second area, said first area having a phase of grating a predeterminedangle different from a phase of said second area so that said first areaforms first interference fringes having a phase a predetermined angledifferent from that of second interference fringes formed by said secondarea, and said displacement information obtaining means comprises fourlight-receiving elements so that signals having different phases areobtained in order to obtain said information including displacement andmoving direction.
 13. The optical encoder as claimed in claim 1, whereinone of said first grating and said second grating linearly movesrelatively to each other so that said optical encoder forms a linearencoder.
 14. The optical encoder as claimed in claim 1, wherein said oneof said first grating and said second grating is formed in a cylindricalshape so that said optical encoder forms a rotary encoder.
 15. Theoptical encoder as claimed in claim 1, wherein said one of said firstgrating and said second grating is formed in a plane circular shape sothat said optical encoder forms a rotary encoder.
 16. The opticalencoder as claimed in claim 1, further comprising:a convergent lensbetween said light source and said first grating.
 17. The opticalencoder as claimed in claim 1, further comprising:a convergent lensbetween said second grating and said light-receiving element.